{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 12.2 数据准备"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 数据清洗"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import pyecharts.options as opts\n",
    "from pyecharts.charts import Line, Grid, Bar, Pie, Funnel, Page, Tab"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 数据加载\n",
    "data_df = pd.read_csv('./projct_dataset.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 数据预览\n",
    "data_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_df.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 检查重复值\n",
    "data_df.duplicated().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 删除重复值\n",
    "data_df.drop_duplicates(inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 删除无用列\n",
    "data_df.drop(columns=['user_geohash'], inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 检查缺失值\n",
    "data_df.isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 预览清洗后的数据集\n",
    "data_df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 数据处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 添加行为类型描述列\n",
    "behavior_type_dict = {1: '点击',\n",
    "                      2: '收藏',\n",
    "                      3: '加入购物车',\n",
    "                      4: '支付'}\n",
    "data_df['behavior_desc'] = data_df['behavior_type'].map(behavior_type_dict)\n",
    "data_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 处理时间列\n",
    "data_df[['date', 'hour']] = data_df['time'].str.split(' ', expand=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 更改数据类型\n",
    "data_df['date'] = pd.to_datetime(data_df['date'])\n",
    "data_df['hour'] = data_df['hour'].astype('int')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_df.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_df['date'].min()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_df['date'].max()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 按时间排序\n",
    "data_df = data_df.sort_values(by=['date','hour'])\n",
    "data_df.head(20)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 保存清洗处理的数据集\n",
    "data_df.to_csv('./cln_proj_dataset.csv', index=False, encoding='utf-8')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 12.3 子图制作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 加载处理的数据集\n",
    "data_df = pd.read_csv('./cln_proj_dataset.csv')\n",
    "data_df['date'] = pd.to_datetime(data_df['date'])\n",
    "data_df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 流量指标"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 日流量指标\n",
    "# 日 PV\n",
    "daily_pv = data_df[data_df['behavior_desc'] == '点击'].groupby('date').count()['user_id'].reset_index().rename(columns = {'user_id': 'pv'})\n",
    "daily_pv.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 日 UV\n",
    "daily_uv = data_df[data_df['behavior_desc'] == '点击'].groupby('date').nunique()['user_id'].reset_index().rename(columns={'user_id': 'uv'})\n",
    "daily_uv.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 可视化日PV\n",
    "daily_pv_line = (\n",
    "    Line(init_opts=opts.InitOpts(width='400px', height='300px'))\n",
    "    .add_xaxis(xaxis_data=daily_pv['date'].tolist())\n",
    "    .add_yaxis(\n",
    "        series_name=\"日PV\",\n",
    "        y_axis=daily_pv['pv'].tolist(),\n",
    "        is_symbol_show=True,\n",
    "        label_opts=opts.LabelOpts(is_show=False)\n",
    "    )\n",
    "    .extend_axis(\n",
    "        yaxis=opts.AxisOpts(\n",
    "            name=\"日UV\",\n",
    "            type_=\"value\",\n",
    "            min_=0,\n",
    "            max_=8000\n",
    "        )\n",
    "    )\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(\n",
    "            title='用户日流量指标'),\n",
    "        tooltip_opts=opts.TooltipOpts(\n",
    "            trigger='axis', \n",
    "            axis_pointer_type='line'),\n",
    "        xaxis_opts=opts.AxisOpts(\n",
    "            type_='time',\n",
    "            name='日期',\n",
    "        ),\n",
    "        yaxis_opts=opts.AxisOpts(\n",
    "            type_='value',\n",
    "            name='日PV')\n",
    "    )\n",
    ")\n",
    "\n",
    "daily_uv_line = (\n",
    "    Line()\n",
    "    .add_xaxis(xaxis_data=daily_uv['date'].tolist())\n",
    "    .add_yaxis(\n",
    "        series_name=\"日UV\",\n",
    "        y_axis=daily_uv['uv'].tolist(),\n",
    "        is_symbol_show=True,\n",
    "        label_opts=opts.LabelOpts(is_show=False),\n",
    "        yaxis_index=1\n",
    "    )\n",
    ")\n",
    "\n",
    "daily_pv_line.overlap(daily_uv_line)\n",
    "daily_pv_line.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "观察结果：在该月内，访问量和用户量整体缓慢攀升，并在双十二期间达到峰值，可见双十二的活动效果明显。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 小时流量指标\n",
    "# 小时PV\n",
    "hourly_pv = data_df[data_df['behavior_desc'] == '点击'].groupby('hour').count()['user_id'].reset_index().rename(columns={'user_id': 'pv'})\n",
    "hourly_pv.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 小时UV\n",
    "hourly_uv = data_df[data_df['behavior_desc'] == '点击'].groupby('hour').nunique()['user_id'].reset_index().rename(columns={'user_id': 'uv'})\n",
    "hourly_uv.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 可视化小时PV\n",
    "hourly_pv_line = (\n",
    "    Line(init_opts=opts.InitOpts(width='400px', height='300px'))\n",
    "    .add_xaxis(xaxis_data=hourly_pv['hour'])\n",
    "    .add_yaxis(\n",
    "        series_name=\"小时PV\",\n",
    "        y_axis=hourly_pv['pv'].tolist(),\n",
    "        is_symbol_show=True,\n",
    "        label_opts=opts.LabelOpts(is_show=False),\n",
    "    )\n",
    "    .extend_axis(\n",
    "        yaxis=opts.AxisOpts(\n",
    "            name=\"小时UV\",\n",
    "            type_=\"value\",\n",
    "            min_=0,\n",
    "            max_=10000\n",
    "        )\n",
    "    )\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(\n",
    "            title='用户小时流量指标'),\n",
    "        tooltip_opts=opts.TooltipOpts(\n",
    "            trigger='axis', \n",
    "            axis_pointer_type='line'),\n",
    "        yaxis_opts=opts.AxisOpts(\n",
    "            type_='value',\n",
    "            name='小时PV')\n",
    "    )\n",
    "    \n",
    ")\n",
    "\n",
    "hourly_uv_line = (\n",
    "    Line()\n",
    "    .add_xaxis(xaxis_data=hourly_uv['hour'].tolist())\n",
    "    .add_yaxis(\n",
    "        series_name=\"小时UV\",\n",
    "        y_axis=hourly_uv['uv'].tolist(),\n",
    "        is_symbol_show=True,\n",
    "        label_opts=opts.LabelOpts(is_show=False),\n",
    "        yaxis_index=1\n",
    "    )\n",
    ")\n",
    "\n",
    "hourly_pv_line.overlap(hourly_uv_line)\n",
    "hourly_pv_line.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "观察结果：23点到次日5点的访问量和用户量都在下降，5点到18点回升到相对稳定的水平；18点到22点访问量有比较明显的提升，并在21点和22点达到峰值，而用户量的趋势类似，但相对不那么明显。\n",
    "\n",
    "小结：18-22点为用户活跃时段，5-18点为用户一般活跃时段，23-5点为用户非活跃时段。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 用户购买次数分布"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 用户购买次数分布\n",
    "user_buy_time = data_df[data_df['behavior_desc'] == '支付'].groupby('user_id').size()\n",
    "buy_hist, bins = np.histogram(user_buy_time.values, bins=10, range=[0, 100])\n",
    "buy_hist"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "buy_time_category = [str(int(a)) + '-' + str(int(b)) for a, b in zip(bins[:-1], bins[1:])]\n",
    "buy_time_category"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 可视化直方图结果\n",
    "buy_hist_bar = (\n",
    "    Bar(init_opts=opts.InitOpts(width='400px', height='300px'))\n",
    "    .add_xaxis(buy_time_category)\n",
    "    .add_yaxis(\n",
    "        series_name=\"\",\n",
    "        y_axis=buy_hist.tolist(),\n",
    "        category_gap=0.2\n",
    "    )\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(\n",
    "            title='用户购买次数分布',),\n",
    "    )\n",
    ")\n",
    "\n",
    "buy_hist_bar.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "观察结果：从购买次数分布图来看，购买次数20次以内的，尤其是10次以内的用户比例非常大\n",
    "\n",
    "小结：应重点关注购买次数在20次以内，尤其是10次以内的用户，进一步挖掘其购买力。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 热门商品和类别分析"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 点击量排名前10的商品种类\n",
    "top_item_categories = data_df.groupby('item_category')['user_id'].count().sort_values(ascending=False).head(10)\n",
    "top_item_categories.name = 'Count'\n",
    "top_item_cat_df = top_item_categories.to_frame().reset_index()\n",
    "top_item_cat_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "top_cat_pie = (\n",
    "    Pie(init_opts=opts.InitOpts(width='400px'))\n",
    "    .add(\"\", top_item_cat_df.values.tolist())\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title=\"Top10 商品类别\"),\n",
    "        legend_opts=opts.LegendOpts(is_show=False),\n",
    "    )\n",
    "    .set_series_opts(label_opts=opts.LabelOpts(formatter=\"{d}%\"))\n",
    ")\n",
    "\n",
    "top_cat_pie.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 点击量排名前10的商品\n",
    "top_items = data_df.groupby('item_id')['user_id'].count().sort_values(ascending=False).head(10)\n",
    "top_items.name = 'Count'\n",
    "top_item_df = top_items.to_frame().reset_index()\n",
    "top_item_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "top_item_pie = (\n",
    "    Pie(init_opts=opts.InitOpts(width='400px'))\n",
    "    .add(\"\", top_item_df.values.tolist())\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title=\"Top10 商品\"),\n",
    "        legend_opts=opts.LegendOpts(is_show=False),\n",
    "    )\n",
    "    .set_series_opts(label_opts=opts.LabelOpts(formatter=\"{d}%\"))\n",
    ")\n",
    "\n",
    "top_item_pie.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 用户行为漏斗分析"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "behavior_count = data_df.groupby('behavior_desc').size()\n",
    "behavior_count"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "pv = behavior_count['点击']\n",
    "favor = behavior_count['收藏']\n",
    "cart = behavior_count['加入购物车']\n",
    "buy = behavior_count['支付']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 点击转化率计算\n",
    "print('点击 —— 收藏转化率：{:.2%}'.format(favor / pv))\n",
    "print('点击 —— 购物车转化率：{:.2%}'.format(cart / pv))\n",
    "print('点击 —— 支付转化率：{:.2%}'.format(buy / pv))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 收藏+购物车转化率\n",
    "print('收藏 —— 支付转化率：{:.2%}'.format(buy / (favor + cart)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 可视化用户转化漏斗\n",
    "behabior_category = ['点击', '收藏/加入购物车', '支付']\n",
    "rates = [1 * 100, (favor + cart) / pv * 100, buy / pv * 100]\n",
    "format_rates = [round(r, 2) for r in rates]\n",
    "\n",
    "funnel = (\n",
    "    Funnel(init_opts=opts.InitOpts(width='400px'))\n",
    "    .add(\n",
    "        series_name='用户行为',\n",
    "        data_pair=[i for i in zip(behabior_category, format_rates)],\n",
    "        tooltip_opts=opts.TooltipOpts(\n",
    "            trigger='item', \n",
    "            formatter='{b}: {c}%',\n",
    "            is_show=True),\n",
    "        label_opts=opts.LabelOpts(\n",
    "            is_show=True, \n",
    "            position='outside'),\n",
    "    )\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title='用户行为漏斗分析'),\n",
    "        legend_opts=opts.LegendOpts(is_show=False)\n",
    "    )\n",
    ")\n",
    "\n",
    "funnel.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "观察结果：用户总体转化率较低，其中点击—支付转化率仅有1.48%，而点击—收藏和点击—购物车的转化率相对高一些，但也仅有3%和4%；而收藏或加入购物车的转化率为19.27%，对比点击转化率比较大的提升。\n",
    "\n",
    "小结：用户的点击转化率总体偏低，而收藏和加购这类表现出商品兴趣的行为转化率会有较大的提升。\n",
    "\n",
    "建议：\n",
    "1. 针对点击转化率的问题，一方面可以多举办限时促销活动，促使用户尽快下单，另一方面拓展站外流量来源，增加点击量；\n",
    "2. 在功能设计上，引导用户收藏和加购商品的功能，并在收藏和购物车页面配合提醒功能，以增加购买转化率。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 用户价值分类"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 构造R值\n",
    "last_time = data_df[data_df['behavior_desc'] == '支付'].groupby('user_id').max()['date']\n",
    "recency = (data_df['date'].max() - last_time).dt.days.copy()\n",
    "median_recency = recency.median()\n",
    "recency[recency <= median_recency] = 1\n",
    "recency[recency > median_recency] = 0\n",
    "recency.name = 'R'\n",
    "recency.head(20)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 构建F值\n",
    "frequency = data_df[data_df['behavior_desc'] == '支付'].groupby('user_id')['item_id'].size()\n",
    "median_freq = frequency.median()\n",
    "frequency[frequency <= median_freq] = 0\n",
    "frequency[frequency > median_freq] = 1\n",
    "frequency.name = 'F'\n",
    "frequency.head(20)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "rfm = pd.merge(recency, frequency, on='user_id', how='inner')\n",
    "rfm = rfm[['R','F']].astype('str')\n",
    "rfm['RF'] = rfm['R'] + rfm['F']\n",
    "rfm.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "user_tag_dict = {\n",
    "    '11': '重要价值客户',\n",
    "    '10': '重要发展客户',\n",
    "    '01': '重要保持客户',\n",
    "    '00': '重要挽留客户'\n",
    "}\n",
    "rfm['user_tag'] = rfm['RF'].map(user_tag_dict)\n",
    "rfm.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 统计分层客户数量\n",
    "user_tag_count = rfm.groupby('user_tag').size()\n",
    "user_tag_count"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "user_tag_count.index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 可视化统计分层客户数量\n",
    "user_tag_pie = (\n",
    "    Pie(init_opts=opts.InitOpts(width='400px'))\n",
    "    .set_global_opts(\n",
    "        legend_opts=opts.LegendOpts(is_show=False)\n",
    "    )\n",
    "    .add(\n",
    "        series_name='购买次数占比',\n",
    "        data_pair=[list(z) for z in zip(user_tag_count.index.tolist(), user_tag_count.values.tolist())],\n",
    "        radius=['30%', '70%'],\n",
    "        label_opts=opts.LabelOpts(\n",
    "            is_show=True, \n",
    "            position='outside'),\n",
    "    )\n",
    "    .set_series_opts(\n",
    "        tooltip_opts=opts.TooltipOpts(\n",
    "            trigger='item', \n",
    "            formatter='{b}: {d}%')\n",
    "    )\n",
    ")\n",
    "\n",
    "user_tag_pie.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "结论：\n",
    "1. 重要价值客户是最优质的用户群体，应重点关注，既要保持其粘性，又要继续引导消费，可为这类用户提供VIP服务；\n",
    "2. 重要发展客户的特点是近期有消费但频次不高，策略是提高其消费次数，具体措施有促销活动提醒和优惠卷活动等；\n",
    "3. 重要保持客户的特点是消费频次高但有一段时间没有消费，策略是重新唤醒，通过APP消息推送，以及站外广告营销吸引其注意力，促进复购；\n",
    "4. 重要挽留客户近期没有消费且频次不高，若不加以挽留，会有流失的可能，对于这类用户一方面需要保持曝光量，持续推送活动和优惠信息，另一方面需要进一步研究其兴趣和需求，才能采取有效的运营策略。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 12.3 数据大屏制作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "page_user = (\n",
    "    Page()\n",
    "    .add(daily_pv_line)\n",
    "    .add(hourly_pv_line)\n",
    "    .add(buy_hist_bar)\n",
    ")\n",
    "page_user.render('./page_user.html')\n",
    "\n",
    "page_product = (\n",
    "    Page()\n",
    "    .add(top_cat_pie)\n",
    "    .add(top_item_pie)\n",
    ")\n",
    "page_product.render('./page_product.html')\n",
    "\n",
    "page_behaviour = (\n",
    "    Page()\n",
    "    .add(funnel)\n",
    "    .add(user_tag_pie)\n",
    ")\n",
    "page_behaviour.render('./page_behaviour.html')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "data_anal_env",
   "language": "python",
   "name": "data_anal_env"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
